Skip to content
This repository was archived by the owner on Sep 19, 2021. It is now read-only.

Update RoomSettingModal.js#51

Open
ghost wants to merge 1 commit intomainfrom
iDaFox-try-1
Open

Update RoomSettingModal.js#51
ghost wants to merge 1 commit intomainfrom
iDaFox-try-1

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Apr 15, 2021

I tried to add a close button for RoomSettings Form.

Copy link
Copy Markdown
Contributor

@remote-event remote-event left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React Fragment is used to group multiple elements together without having to add extra nodes to the DOM ( https://reactjs.org/docs/fragments.html ) . Right now , you are using this incorrectly because React.Fragment doesn't take these props ( you probably want to do this with a Modal ). Change React.Fragment to Modal to change components.


return (
<React.Fragment>
<React.Fragment onHide={props.onHide} show={props.show}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change React.Fragment to Modal to use the Modal component instead.

return (
<React.Fragment>
<React.Fragment onHide={props.onHide} show={props.show}>
<Modal.Header closeButton>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use self closing tags if there is no content inside the component. <Modal.Header closeButton/>

@remote-event
Copy link
Copy Markdown
Contributor

Make sure the RoomSettingModal component is getting passed the props that is needed to use the Modal or else it won't work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant